<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="/system/include/taglib.jsp"%>
<html>
<head>
<base href="${pageScope.basePath }">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>中山市美斯特实业有限公司</title>
<link type="text/css" rel="stylesheet" href="system/css/style.css" />
<script type="text/javascript" language="javascript" src="system/js/public.js"></script>
<script type="text/javascript" src="system/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="system/js/validate.js"></script>
<script type="text/javascript" language="javascript">	
//验证按钮名是否为空
$(document).ready(function(){
		validate_Effect("#buttonName","[按钮名不能为空！]");				
		validate_Effect("#actionKey","[actionKey不能为空！]");
		$("#actionKey").blur(function(){
		  		var actionKey=$("#actionKey").val();//动态设置json传递参数，以及相应的形参。。。。。。
		  		ajaxRequest_validate("#actionKey","system/ajax/button.do?method=validate",{"actionKey":actionKey});
		});
		return false;	
						
});
		
function checkForm(){	
	var menuNameIsNull=validateValueIsNull("#buttonName");
	if(menuNameIsNull){
		return false;
	}
	var actionKeyIsNull=validateValueIsNull("#actionKey");
	if(actionKeyIsNull){
		return false;
	}	
	else{
		return true;
	}
}
</script>
</head>
<body>
<div class="main">
	<div class="position">当前位置: <a href="sysadm/desktop.jsp">桌 面</a> → 添加菜单</div>
	<div class="mainbody">
		<div class="operate_info">操作说明：带 * 号必填</div>
		<div class="table">
		<form action="system/config/button_add.do" method="post" onsubmit="return checkForm()">
			<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table_form">
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">按钮名称：</td>					
						<td><input name="buttonName" id="buttonName"/>　*必填 
						 </td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">操作键：</td>
						<td><input name="actionKey" id="actionKey" />　*必填 例如：adduser </td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">按钮相关说明：</td>
						<td><textarea rows="3" cols="20" name="buttonNote" ></textarea>　非必填  </td>
					</tr>
					<tr>
						<td colspan="2" class="form_button" style="padding-top:10px;">
							<input type="submit" value="保存" id="save"/>
							<input type="reset" value="重置" />
						</td>
					</tr>
			</table>
			</form>
		</div>
	</div>
</div>
</body>
</html>
